{
/* Is this guest physical address RAM-backed? */
#if defined(CONFIG_DM) && (defined(__i386__) || defined(__x86_64__))
- if (ram_size <= HVM_BELOW_4G_RAM_END)
- /* RAM is contiguous */
- return (addr < ram_size);
- else
- /* There is RAM below and above the MMIO hole */
- return ((addr < HVM_BELOW_4G_MMIO_START) ||
- ((addr >= HVM_BELOW_4G_MMIO_START + HVM_BELOW_4G_MMIO_LENGTH)
- && (addr < ram_size + HVM_BELOW_4G_MMIO_LENGTH)));
+ return ((addr < HVM_BELOW_4G_MMIO_START) ||
+ (addr >= HVM_BELOW_4G_MMIO_START + HVM_BELOW_4G_MMIO_LENGTH));
#else
return (addr < ram_size);
#endif
/* Double-check that the bitmaps are the size we expect */
if (logdirty_bitmap_size != *(uint32_t *)seg) {
- fprintf(logfile, "Log-dirty: got %lu, calc %lu\n",
+ fprintf(logfile, "Log-dirty: got %u, calc %lu\n",
*(uint32_t *)seg, logdirty_bitmap_size);
return;
}
fprintf(logfile, "Log-dirty: bad next-active entry: %s\n", act);
exit(1);
}
- logdirty_bitmap = seg + i * logdirty_bitmap_size;
+ logdirty_bitmap = (unsigned long *)(seg + i * logdirty_bitmap_size);
/* Ack that we've switched */
xs_write(xsh, XBT_NULL, active_path, act, len);
path = xs_get_domain_path(xsh, domid);
if (path == NULL) {
- fprintf(logfile, "xs_get_domain_path(%d): error\n");
+ fprintf(logfile, "xs_get_domain_path: error\n");
goto out;
}
# Execute device model.
#todo: Error handling
args = [self.device_model]
- args = args + ([ "-d", "%d" % self.vm.getDomid(),
- "-m", "%s" % (self.getRequiredInitialReservation() / 1024)])
+ args = args + ([ "-d", "%d" % self.vm.getDomid() ])
+ if arch.type == "ia64":
+ args = args + ([ "-m", "%s" %
+ (self.getRequiredInitialReservation() / 1024) ])
args = args + self.dmargs
if restore:
- args = args + ([ "-loadvm", "/tmp/xen.qemu-dm.%d" % self.vm.getDomid() ])
+ args = args + ([ "-loadvm", "/tmp/xen.qemu-dm.%d" %
+ self.vm.getDomid() ])
env = dict(os.environ)
if self.display:
env['DISPLAY'] = self.display